home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / src-server / Makefile.hpux < prev    next >
Encoding:
Makefile  |  1991-10-06  |  14.1 KB  |  347 lines

  1. ################################################################################
  2. #
  3. # File:         Makefile.hpux
  4. # RCS:          $Header: Makefile.hpux,v 1.5 91/03/25 03:54:55 mayer Exp $
  5. # Description:  Makefile for WINTERP on s300 HPUX 7.0 -- see notes below
  6. #        for modifying this file for use on s800 HPUX 7.0.
  7. # Author:       Niels Mayer, HPLabs
  8. # Created:      Mon Oct 23 20:47:37 1989
  9. # Modified:     Sat Oct  5 22:33:02 1991 (Niels Mayer) mayer@hplnpm
  10. # Language:     N/A
  11. # Package:      N/A
  12. # Status:       X11r5 contrib tape release
  13. #
  14. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. #
  17. # Permission to use, copy, modify, distribute, and sell this software and its
  18. # documentation for any purpose is hereby granted without fee, provided that
  19. # the above copyright notice appear in all copies and that both that
  20. # copyright notice and this permission notice appear in supporting
  21. # documentation, and that the name of Hewlett-Packard and David Betz not be
  22. # used in advertising or publicity pertaining to distribution of the software
  23. # without specific, written prior permission.  Hewlett-Packard and David Betz
  24. # make no representations about the suitability of this software for any
  25. # purpose. It is provided "as is" without express or implied warranty.
  26. #
  27. # HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  28. # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  29. # IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  30. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  31. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  32. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  33. # PERFORMANCE OF THIS SOFTWARE.
  34. #
  35. # See ./winterp/COPYRIGHT for information on contacting the authors.
  36. #
  37. # Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  38. # Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  39. #
  40. ################################################################################
  41.  
  42. #
  43. # Note on INCLUDES for Motif 1.0:
  44. # ==============================
  45. # Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
  46. # make sure that you are compiling Motif 1.0 programs with the headers
  47. # associated with Motif 1.0, not the X11r4 headers.
  48. #
  49. # Standard locations for Motif includes are /usr/include/X11 and
  50. # /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
  51. # intrinsics headers which are installed in /usr/include/X11. Don't
  52. # confuse these    with the incompatible Xtoolkit intrinsics from X11r4.
  53. #
  54. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
  55. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  56. # (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  57. # TO THE APPROPRIATE LOCATION.
  58. #
  59. #
  60. # Note on INCLUDES for Motif 1.1:
  61. # ==============================
  62. # Motif 1.1 uses the X11r4 Xlib, libXt, etc, however, Motif 1.1 is not
  63. # included as part of the X11r4 distribution.  Make sure that you either
  64. # have the X11r4 and Motif headers installed, or that you are setting
  65. # INCLUDES so that the appropriate include directories are used.
  66. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
  67. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  68. # (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  69. # TO THE APPROPRIATE LOCATION.
  70. #            --------------------
  71. # NOTE: if you modify INCLUDES below, you must also do the same 
  72. # modification in xlisp/Makefile.hpux
  73. #
  74.  
  75. # INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11 -I/mnt0/src/X11r4/mit -I/mnt0/src/X11r4/mit/X11
  76. INCLUDES = -I. -I/usr/include
  77.  
  78.  
  79.  
  80. #
  81. # Note on LIBS:
  82. #       "-lm" == libm.a:
  83. #        This is required by XLISP since it includes math routines.
  84. #
  85. #    "-lXm" == libXm.a:
  86. #        This library is part of OSF/Motif, it is not included with
  87. #        X11r4. Many systems vendors sell Motif as part of their OS,
  88. #        e.g. HP, IBM, DEC, MIPS, SCO, etc. If you haven't installed
  89. #        Motif on your system, then replace -lXm below with
  90. #        <path>/libXm.a
  91. #
  92. #    "-lXt" == libXt.a:
  93. #        If you are using Motif 1.1, this should be the standard
  94. #        X11r4 Xt Instrinsics library, with MIT patches 1-18, and any
  95. #        additional patches distributed by OSF.
  96. #        If you are using Motif 1.0, make sure that -lXt points to
  97. #        Motif 1.0's libXt.a, perhaps by specifying <path>/libXt.a.
  98. #        DO NOT USE libXt.a from X11r4 with Motif 1.0 -- they are
  99. #        incompatible.
  100. #
  101. #    "-lX11" == libX11.a:
  102. #        If you are using Motif 1.1, this is the standard X11r4
  103. #        X11 library, or the X11 library supplied by your vendor.
  104. #        For Motif 1.0, you should probably use the X11 library
  105. #        supplied by your vendor (e.g. -lX), although the X11r4
  106. #        libX11.a should work too.
  107. #
  108. #    "-lPW" == libPW.a:
  109. #        This library is required by Motif's file selection box widget
  110. #        on some brands of Unix, such as HPUX, MIPS, and other systems
  111. #        that I am not familiar with. Note that this library may or
  112. #        may not be required for other OS's. See    the Motif documentation
  113. #        for your particular installation of Motif for details.
  114. #
  115. #    "-lmalloc" == libmalloc.a:
  116. #        I've been using this fast malloc library on HPUX. When
  117. #        used in conjuction with Motif, -lmalloc causes a tremendous
  118. #        improvement in the overall application performance. Supposedly
  119. #        for HPUX 8.0, the standard malloc will be faster, though...
  120. #
  121.  
  122. # LIBS = /mnt0/src/OSFMotif1.1.1/lib/Xm/libXm.a /mnt0/src/X11r4/mit/lib/Xt/libXt.a /mnt0/src/X11r4/mit/lib/X/libX11.a -lPW -lm -lmalloc
  123. LIBS = -lXm -lXt -lX11 -lPW -lm -lmalloc
  124.  
  125.  
  126.  
  127. #
  128. # Note on DEFINES:
  129. # (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
  130. # WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
  131. # for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
  132. #
  133. # (2) -DSYSV and -Dhpux are used to make X11 software more portable, in
  134. # conjuction with macros in X11/Xos.h.
  135. #
  136. # (3) -DMALLOC_0_RETURNS_NULL is needed on HPUX 7.0 when linking with
  137. # the fast malloc library "-lmalloc".
  138. #
  139. # (4) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
  140. # non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
  141. # and at that point this flag should be removed.
  142. #            --------------------
  143. # NOTE: if you modify DEFINES below, you must also do the same 
  144. # modification in xlisp/Makefile.hpux
  145. #
  146.  
  147. DEFINES = -DWINTERP -DSYSV -Dhpux -DMALLOC_0_RETURNS_NULL -D_NO_PROTO $(USER_DEFINES)
  148.  
  149.  
  150. #
  151. # Note on CFLAGS:
  152. # For HPUX 8.0 or s800 HPUX 7.0, remove
  153. # "-Wc,-Nd4000,-Ns3300,-Ne700,-Np1000" from CFLAGS below.
  154. #
  155.  
  156. CFLAGS = $(INCLUDES) -Wc,-Nd4000,-Ns3300,-Ne700,-Np1000 $(DEFINES)
  157.  
  158.  
  159. OPTIMIZER = -O
  160.  
  161.  
  162. ##############################################################################
  163. LINT = /usr/bin/lint
  164. .SUFFIXES: .ln .c
  165. .c.ln:
  166.     $(LINT) -c $*.c -Nd4000 -Ns3000 -Na50000 $(DEFINES)
  167.  
  168.  
  169. ##############################################################################
  170. .c.o:
  171.     $(CC) -c $(OPTIMIZER) $*.c $(CFLAGS)
  172.  
  173.  
  174. ##############################################################################
  175. HDRS          = app_fundecl.h \
  176.         app_funextn.h \
  177.         app_funidx.h \
  178.         config.h \
  179.         user_prefs.h \
  180.         w_XmString.h \
  181.         w_funtab.h \
  182.         winterp.h
  183.  
  184. SRCS          = utils.c \
  185.         w_XmString.c \
  186.         w_callbacks.c \
  187.         w_classes.c \
  188.         w_evnthndlr.c \
  189.         w_funtab.c \
  190.         w_libXm.c \
  191.         w_libXt.c \
  192.         w_pixmap.c \
  193.         w_resources.c \
  194.         w_savedobjs.c \
  195.         w_timeouts.c \
  196.         w_txlations.c \
  197.         w_utils.c \
  198.         wc_ArrowB.c \
  199.         wc_BulletinB.c \
  200.         wc_CascadeB.c \
  201.         wc_Command.c \
  202.         wc_DrawingA.c \
  203.         wc_DrawnB.c \
  204.         wc_FileSB.c \
  205.         wc_Form.c \
  206.         wc_Frame.c \
  207.         wc_Label.c \
  208.         wc_List.c \
  209.         wc_MainW.c \
  210.         wc_MessageB.c \
  211.         wc_PanedW.c \
  212.         wc_PushB.c \
  213.         wc_RowColumn.c \
  214.         wc_SHELL.c \
  215.         wc_Scale.c \
  216.         wc_ScrollBar.c \
  217.         wc_ScrolledW.c \
  218.         wc_SelectioB.c \
  219.         wc_Separator.c \
  220.         wc_Text.c \
  221.         wc_ToggleB.c \
  222.         wc_WIDGET.c \
  223.         winterp.c
  224.  
  225. OBJS          = $(SRCS:.c=.o)
  226.  
  227. LINTS          =    $(SRCS:.c=.ln)
  228.  
  229. ##############################################################################
  230. DEST          = .
  231.  
  232. INSTALL          = install
  233.  
  234. LD          = $(CC)
  235.  
  236. LDFLAGS          = 
  237.  
  238. MAKEFILE      = Makefile.hpux
  239.  
  240. PRINT          = pr
  241.  
  242. PROGRAM       = winterp
  243.  
  244. SHELL          = /bin/sh
  245.  
  246. all::        $(PROGRAM)
  247.  
  248. $(PROGRAM):     $(OBJS) xlisp/libXlisp.a
  249.         @echo "Linking $(PROGRAM) ..."
  250.         $(LD) $(LDFLAGS) $(OBJS) xlisp/libXlisp.a $(LIBS) -o $(PROGRAM)
  251.         @echo "done"
  252.  
  253. XmGraph::
  254.         @echo "Making winterp+XmGraph ..."
  255.         @echo "Be sure to delete all .o files if you previously compiled w/o -DHP_GRAPH_WIDGET!"
  256.         (make -f Makefile.hpux "USER_DEFINES=-DHP_GRAPH_WIDGET $(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" winterp+XmGraph)
  257.  
  258. winterp+XmGraph:    $(OBJS) wc_XmGraph.o xlisp/libXlisp.a
  259.             @echo "Linking winterp+XmGraph ..."
  260.             $(LD) $(LDFLAGS) $(OBJS) wc_XmGraph.o xlisp/libXlisp.a -lXm -lgraph -lXt -lX11 -lPW -lm -lmalloc -o winterp+XmGraph
  261.             @echo "done"
  262.             
  263. xlisp/libXlisp.a::
  264.     (cd $(@D) ; make -f Makefile.hpux "USER_DEFINES=$(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" $(@F) ; cd ..)
  265.  
  266. lint:    $(LINTS) xlisp/llib-Xlisp.ln
  267.     $(LINT) $(LINTS) xlisp/llib-Xlisp.ln -lXm -lXt -lX11 -lm -lmalloc -Zn8192 -Zt16384 -Zf500 > lint 2>&1
  268.  
  269. xlisp/llib-Xlisp.ln::
  270.     (cd $(@D) ; make -f Makefile.hpux "USER_DEFINES=$(USER_DEFINES)" $(@F) ; cd ..)
  271.  
  272. TAGS: $(HDRS) $(SRCS) xlisp/libXlisp.a
  273.     etags -et $(HDRS) $(SRCS) xlisp/*.h xlisp/*.c
  274.  
  275. cscope::
  276.     cscope-x -I. -Ixlisp/. -S. -S xlisp/. -name Winterp -iconic & 
  277.  
  278. run:;        winterp
  279.  
  280. clean:;        rm -f $(OBJS) $(LINTS) core
  281.  
  282. clobber:;    rm -f $(OBJS) $(PROGRAM)  $(LINTS) lint TAGS core tags
  283.  
  284. depend:;    mkmf -f $(MAKEFILE) ROOT=$(ROOT)
  285.  
  286. echo:;        @echo $(HDRS) $(SRCS)
  287.  
  288. index:;        ctags -wx $(HDRS) $(SRCS)
  289.  
  290. install:    $(PROGRAM)
  291.         @echo Installing $(PROGRAM) in $(DEST)
  292.         -strip $(PROGRAM)
  293.         if [ $(DEST) != . ]; then \
  294.         (rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi
  295.  
  296. print:;        $(PRINT) $(HDRS) $(SRCS)
  297.  
  298. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  299.  
  300. update:        $(DEST)/$(PROGRAM)
  301.  
  302. $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS)
  303.         $(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install
  304. ###
  305. utils.o:
  306. w_XmString.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h
  307. w_callbacks.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  308. w_classes.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  309. w_evnthndlr.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  310. w_funtab.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h app_funextn.h app_fundecl.h
  311. w_libXm.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h 
  312. w_libXt.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  313. w_pixmap.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  314. w_resources.o:  winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h 
  315. w_savedobjs.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  316. w_timeouts.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  317. w_txlations.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  318. w_utils.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  319. wc_ArrowB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  320. wc_BulletinB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  321. wc_CascadeB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  322. wc_Command.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  323. wc_DrawingA.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  324. wc_DrawnB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  325. wc_FileSB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  326. wc_Form.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  327. wc_Frame.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  328. wc_Label.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  329. wc_List.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  330. wc_MainW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  331. wc_MessageB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  332. wc_PanedW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  333. wc_PushB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  334. wc_RowColumn.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  335. wc_SHELL.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  336. wc_Scale.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  337. wc_ScrollBar.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  338. wc_ScrolledW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  339. wc_SelectioB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  340. wc_Separator.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  341. wc_Text.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  342. wc_ToggleB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  343. wc_WIDGET.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  344. wc_XmGraph.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  345. winterp.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  346.